//
//  Globals.swift
//  COPYCAT-Weibo
//
//  Created by 闫萌 on 12/27/15.
//  Copyright © 2015 RendezvousAuParadis. All rights reserved.
//


// 文件名：Globals.swift
import UIKit

let kScreenBounds = UIScreen.mainScreen().bounds

let kRAPCurrentVersion = "RAPCurrentVersion"

// 通知名称
// 进入主界面
let RAPEnterMainInterfaceNotification = "RAPEnterMainInterfaceNotification"
// 进入欢迎页面
let RAPEnterWelcomePageNotification = "RAPEnterWelcomePageNotification"


// MARK: - 接口API
let kAPI_oauth2_authorize = "https://api.weibo.com/oauth2/authorize" // GET/POST
let kAPI_oauth2_access_token = "https://api.weibo.com/oauth2/access_token" // POST
let kAPI_users_show = "https://api.weibo.com/2/users/show.json" // GET
let kAPI_statuses_friends_timeline = "https://api.weibo.com/2/statuses/friends_timeline.json" // GET

/// 发布一条新微博
let kAPI_statuses_update = "https://api.weibo.com/2/statuses/update.json" // POST
/// 上传图片并发布一条新微博
let kAPI_2_statuses_upload = "https://upload.api.weibo.com/2/statuses/upload.json" // POST


// 随机颜色
func randomColor()->UIColor {
    return UIColor(red: CGFloat((arc4random_uniform(256)))/255.0, green: CGFloat((arc4random_uniform(256)))/255.0, blue: CGFloat((arc4random_uniform(256)))/255.0, alpha: 1.0)
}

/** margin = 5 */
let kStatusCellMargin: CGFloat = 5
/** padding = 3 */
let kStatusCellPadding: CGFloat = 3


///  DEBUG打印
///
///  - parameter message: 要打印的内容，可以为空
///  - parameter file:    所属文件
///  - parameter line:    行号
///  - parameter method:  所在方法名
// -D DEBUG —> other swift flags
func RAPLog(message: Any? = "", file: String = __FILE__, line: Int = __LINE__, method: String = __FUNCTION__) {
    #if DEBUG
        // TODO: ANY是个啥？
        print("\((file as NSString).lastPathComponent) --> \(line) --> \(method) /// \(message)")
    #endif
    
}




